/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ejercicios;

import java.util.Scanner;

/**
 *
 * @author zpiik3
 */
public class NumeroMayor {

    /**
     * @param args the command line arguments
     */
   public static void main(String[] args) {
        Scanner tec = new Scanner(System.in);
    double a,b,c,d,a1,a2;
    System.out.println("Dame el primer valor");
    a= tec.nextDouble();
    System.out.println("Dame el segundo valor");
    b= tec.nextDouble();
    System.out.println("Dame el terser valor");
    c= tec.nextDouble();
    System.out.println("Dame el cuarto valor");
    d= tec.nextDouble();

    a1 =Math.max(Math.max(a, b),Math.max(c, d));

    a2 =Math.min (Math.min(a, b),Math.min(c, d));

        System.out.println("mayor"+a1);
        System.out.println("menor"+a2);



    }

}
